#include <iostream>

using namespace std;

int main()
{
    int a[100],b[100];
    int n,k,j;
    cout<<"n=";
    cin>>n;
    for (int i=0;i<n;i++)
    {
        cout<<"a["<<i<<"]=";
        cin>>a[i];
    }
    cout<<"k=";
    cin>>k;
    j=0;
    //10
   /*for (int i=0;i<n;i++)
    {
       if (a[i]%k==0) {b[j]=a[i];j++;}
    }
    for (int i=0;i>n;i++)
    {
        a[i]=b[i];
        cout<<a[i];

    }
     for (int i=0;i>n;i++)
    {
        cout<<b[i];

    }*/
    //11 se dsitruge a
     n=j;
    for (int i=0;i<n;i++)
    {
        a[i]=b[i];
        cout<<a[i] ;
    }
    return 0;
}
